import Login from '@/views/login/Login'
import Layout from '@/views/layout/Layout'
import Success from '@/views/tiktokAuth/Success'

export const navRoutes = [
  // {
  //   path: '/index',
  //   name: 'Home',
  //   component: Main,
  //   meta: {
  //     icon: 'DashboardFilled',
  //     title: '首页'
  //   }
  // },
  {
    path: '/reviewQualifications',
    name: 'ReviewQualifications',
    component: () =>
      import('@/views/reviewQualifications/index.vue'),
    meta: {
      icon: 'CheckSquareOutlined',
      title: '资质审核',
    },
  },
  {
    path: '/userManagement',
    name: 'userManagement',
    component: () =>
      import('@/views/UserManagement/index.vue'),
    meta: {
      icon: 'UserOutlined',
      title: '子用户管理',
    },
  },
  {
    path: '/balanceManagement',
    name: 'BalanceManagement',
    component: () =>
      import('@/views/BalanceManagement/index.vue'),
    meta: {
      icon: 'WalletFilled',
      title: '余额管理',
    },
  },
  {
    path: '/SellerList',
    name: 'SellerList',
    component: () => import('@/views/SellerList/index.vue'),
    meta: {
      icon: 'TeamOutlined',
      title: '商家列表',
    },
  },
  {
    path: '/Warehouse',
    name: 'Warehouse',
    component: () => import('@/views/WarehouseList/index.vue'),
    meta: {
      icon: 'HomeOutlined',
      title: '仓库列表',
    },
  },
]

export const routes = [
  {
    path: '/',
    name: 'Main',
    component: Layout,
    redirect: { name: 'ReviewQualifications' },
    children: [...navRoutes],
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/auth-success',
    name: 'AuthSuccess',
    component: Success,
  },
]
